﻿using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;

namespace SuperX.Common.Helper
{
    // 
    public static class RuntimeEnvironment
    {
        public static bool IsLinux()
        {
            bool isLinux = false;
#if NETSTANDARD2_0
            isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
#elif NET40 || NET45 
            isLinux = false;
#endif
            return isLinux;
        }

        public static bool IsWindows()
        {
            bool isWindows = false;
#if NETSTANDARD2_0
            isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
#elif NET40 || NET45 
            isWindows = true;
#endif
            return isWindows;
        }
    }
}
